package com.zr.datamodel;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 订单实体类
 * @author qiuchun
 *
 */
@Entity
@Table(name="ld_order")
public class OrderDM {
	private int id;
	//订单编号
	private String number;
	//收寄地
	private String startPlace;
	//配送地
	private String endPlace;
	private String sendTime;
	private String orderType;
	//订单状态
	private OrderStatusDM status;
	//寄件人信息
	private String senderName;
	private String senderPhone;
	private String senderAdress;
	//收件人信息
	private String receiverName;
	private String receiverPhone;
	private String receiverAdress;
	//货物
	private List<GoodsDM> goods=new ArrayList<>();
	//资费情况
	private int supportMoney;
	private int payMoney;
	private int conutMoney;
	//支付方式
	private String payWay;
	private String sendData;
	private String remark;
	//删除状态
	private int delStatus;
	//车辆
	private VanDM van;
	//线路
	private RouteDM route;
	//用户(司机）
	private UserDM user;
	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	@Column(name="number")
	public String getNumber() {
		return number;
	}
	public void setNumber(String number) {
		this.number = number;
	}
	@Column(name="start_place")
	public String getStartPlace() {
		return startPlace;
	}
	public void setStartPlace(String startPlace) {
		this.startPlace = startPlace;
	}
	@Column(name="end_place")
	public String getEndPlace() {
		return endPlace;
	}
	public void setEndPlace(String endPlace) {
		this.endPlace = endPlace;
	}
	@Column(name="send_time")
	public String getSendTime() {
		return sendTime;
	}
	public void setSendTime(String sendTime) {
		this.sendTime = sendTime;
	}
	@Column(name="order_type")
	public String getOrderType() {
		return orderType;
	}
	public void setOrderType(String orderType) {
		this.orderType = orderType;
	}
	@ManyToOne
	public OrderStatusDM getStatus() {
		return status;
	}
	public void setStatus(OrderStatusDM status) {
		this.status = status;
	}
	@Column(name="sender_name")
	public String getSenderName() {
		return senderName;
	}
	public void setSenderName(String senderName) {
		this.senderName = senderName;
	}
	@Column(name="sender_phone")
	public String getSenderPhone() {
		return senderPhone;
	}
	public void setSenderPhone(String senderPhone) {
		this.senderPhone = senderPhone;
	}
	@Column(name="sender_adress")
	public String getSenderAdress() {
		return senderAdress;
	}
	public void setSenderAdress(String senderAdress) {
		this.senderAdress = senderAdress;
	}
	@Column(name="receiver_name")
	public String getReceiverName() {
		return receiverName;
	}
	public void setReceiverName(String receiverName) {
		this.receiverName = receiverName;
	}
	@Column(name="receiver_phone")
	public String getReceiverPhone() {
		return receiverPhone;
	}
	public void setReceiverPhone(String receiverPhone) {
		this.receiverPhone = receiverPhone;
	}
	@Column(name="receiver_adress")
	public String getReceiverAdress() {
		return receiverAdress;
	}
	public void setReceiverAdress(String receiverAdress) {
		this.receiverAdress = receiverAdress;
	}
	@OneToMany(mappedBy="orderDm")
	public List<GoodsDM> getGoods() {
		return goods;
	}
	public void setGoods(List<GoodsDM> goods) {
		this.goods = goods;
	}
	@Column(name="support_money")
	public int getSupportMoney() {
		return supportMoney;
	}
	public void setSupportMoney(int supportMoney) {
		this.supportMoney = supportMoney;
	}
	@Column(name="payMoney")
	public int getPayMoney() {
		return payMoney;
	}
	public void setPayMoney(int payMoney) {
		this.payMoney = payMoney;
	}
	@Column(name="count_money")
	public int getConutMoney() {
		return conutMoney;
	}
	public void setConutMoney(int conutMoney) {
		this.conutMoney = conutMoney;
	}
	@Column(name="pay_way")
	public String getPayWay() {
		return payWay;
	}
	public void setPayWay(String payWay) {
		this.payWay = payWay;
	}
	@Column(name="send_data")
	public String getSendData() {
		return sendData;
	}
	public void setSendData(String sendData) {
		this.sendData = sendData;
	}
	@Column(name="remark")
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	@Column(name="del_status")
	public int getDelStatus() {
		return delStatus;
	}
	public void setDelStatus(int delStatus) {
		this.delStatus = delStatus;
	}
	@ManyToOne
	public VanDM getVan() {
		return van;
	}
	public void setVan(VanDM van) {
		this.van = van;
	}
	@ManyToOne
	public RouteDM getRoute() {
		return route;
	}
	public void setRoute(RouteDM route) {
		this.route = route;
	}
	@ManyToOne
	public UserDM getUser() {
		return user;
	}
	public void setUser(UserDM user) {
		this.user = user;
	}
	
	
}
